package com.ideabove.heart.alarm;

import com.ideabove.heart.IntroActivity;
import com.ideabove.heart.util.LogUtil;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class AlarmReceiver  extends BroadcastReceiver {
private static final String	TAG_LOG	= "AlarmReceiver";
	
	@Override
	public void onReceive(Context context, Intent intent) {
		try {			 			
			
			Intent iAlarm = new Intent(context, IntroActivity.class);
			 iAlarm.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
             iAlarm.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);   // Added
             iAlarm.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             iAlarm.putExtra("q", "alarm_start");
             
	        context.startActivity(iAlarm);   

//	        MainActivity.mplay.repeatPlay();
		    
		
		}catch( Exception e ) {
			Output.e(TAG_LOG, e.toString());
		}
	}
}
